home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 5-002 pixer typestry / 1 / typestry.inf < prev   
INI File  |  1993-01-13  |  17KB  |  588 lines

  1. ;;  INSTALIT Script to install beta version of Pixar's Typestry
  2. ;;  Built to run with INSTALIT for windows.
  3. ;;  Needs tests for sufficient hardware and software
  4.  
  5. DefineVariables
  6. Text [CompanyName] := Pixar
  7. Text [ProductName] := Typestry
  8. Text [ProductVersion] := 1.1
  9. Logical [OfferInstallationDirectoryChoice] := Y
  10. Directory [DefaultInstallationDirectory] := TYPESTRY
  11. Text [ModifyMode] := UNDECIDED
  12. Number [MinimumFilesSetting] := 0
  13. Number [MinimumBuffersSetting] := 0
  14. Directory [ReadmeFileName]
  15. Logical [InquireAboutSystemFileLocation] := Y
  16. Logical [AskBeforeFileReplacement] := N
  17. Text [ExitMessage] := Thanks!
  18. Directory [ProgramToRun]
  19. Logical [AddInstallDirectoryToPath] := Y
  20. Text [MinimumOSVersion] := 0
  21. Number [MinimumSystemMemoryRequiredPresent] := 0
  22. Logical [AllowCGA] := N
  23. Logical [AllowMDA] := N
  24. Logical [Allow808x] := N
  25. Logical [Allow80286] := N
  26. Logical [MathCoprocessorRecommended] := N
  27. Logical [FixedDiskRequired] := Y
  28. Text [NetWorkInstallation] := AllowNetwork
  29. Logical [UseShadows] := Y
  30. Text [MainBorder] := NONE
  31. Text [PopupBorder] := SINGLE
  32. Text [TopLine] := "  INSTALLING [ProductName] [ProductVersion]  "
  33. Text [TopLineColors] := BlackOnLightGray
  34. Text [BottomLineColors] := BlackOnLightGray
  35. Text [PopupColors] := BlackOnWhite
  36. Text [AttentionColors] := BlackOnWhite
  37. Text [SpecialPopupColors] := BlackOnWhite
  38. Text [ExtractionOptions] := ShowJustOne  ;; See GetQuedFiles
  39. Logical [NeedToTerminate] := N
  40. Logical [Installed] := N
  41. Text [DisplayAdapterSummary]
  42. Text [CPUTypeSummary]
  43. Text [NetworkActive]
  44. Text [MathCoprocessorStatus]
  45. Text [InstallationDriveSummary]
  46. Text [OSVersionSummary]
  47. Text [SystemMemorySummary]
  48. Logical [InsufficientSystem] := N
  49. Logical [CompatibilityNoticeGiven] := N
  50. Logical [NeedToModify] := N
  51. Text [PathTask]
  52. Text [BuffersTask]
  53. Text [FilesTask]
  54. Text [BackgroundCharacter] := B0
  55. Text [ScreenColors] := BlackOnWhite
  56.  
  57. EndDefineVariables
  58.  
  59.  
  60. SetCustomControls Off
  61. SetBackdrop Off
  62. SetDefaultBitmap Off
  63.  
  64. If [CommandLine1] = -ReplaceFiles
  65.   SetReplacementInquiry Off
  66. EndIf
  67. If [CommandLine2] = -ReplaceFiles
  68.   SetReplacementInquiry Off
  69. EndIf
  70. If [CommandLine3] = -ReplaceFiles
  71.   SetReplacementInquiry Off
  72. EndIf
  73.  
  74. If [InquireAboutSystemFileLocation] = NoCharacter
  75.   If DriveIsPresent [BootDrive]  ;; if not, COMSPEC has been changed
  76.     NoSysFileConfirmation
  77.   EndIf
  78. EndIf
  79.  
  80. If [AskBeforeFileReplacement] = NoCharacter
  81.   SetReplacementInquiry Off
  82. EndIf
  83.  
  84. Do SetupInstalit
  85. Do PrepareSystemReport
  86.  
  87. :Again
  88. ClearScreen
  89. ;;TextBox @xy(Center,4)
  90. ;;  Thanks for purchasing [ProductName].
  91. ;;  To install [ProductName] double click on "Install" below.
  92. ;;EndTextBox
  93. GetMenuChoice @xy(Center,10) UseHeader "MAIN MENU"
  94.   Install
  95.     ;Install [ProductName] [ProductVersion]
  96.   Exit
  97.     ;Exit without installing [ProductName]
  98. EndGetMenuChoice
  99.  
  100. ClearScreen
  101.  
  102. InCase choice is
  103.   =2:  Do ExitInstallation
  104. EndInCase
  105.  
  106. QueFiles
  107.   aawin.exe
  108.   dos4gw.exe
  109.   mkfli.exe
  110.   aaplay.dll
  111.   pixar.dll
  112.   *.hlp
  113.   *.msg
  114.   *.pif
  115.   *.slo
  116.   *.tex
  117.   *.txt
  118.   *.via
  119.   *.vma
  120. EndQueFiles
  121.  
  122. ;;enque the correct executable file for this machine
  123. If MathCoprocessorPresent
  124.   QueFiles
  125.     typefpu.exe
  126.   EndQueFiles
  127. Else
  128.   QueFiles
  129.     typenofp.exe
  130.   EndQueFiles
  131. EndIf
  132.  
  133. If QueSize = 0
  134.   GoTo Continue
  135. EndIf
  136.  
  137. ;;if < Windows 3.1 then install commdlg.dll
  138. If WindowsVersion < 3.1
  139.   QueFiles
  140.     commdlg.dll
  141.   EndQueFiles
  142. EndIF
  143.  
  144. ;;check system requirements here
  145.  
  146. If [InsufficientSystem] = YesCharacter
  147.   Dialog [YesOrNo1] BlackOnWhite ;; Insufficient system notice
  148.     Analysis of your system has determined that it is
  149.     not compatible with [ProductName].  For a complete
  150.     summary, press YesCharacter.
  151.  
  152.     Do you wish to continue anyway?
  153.   EndDialog
  154.   If [YesOrNo1] = NoCharacter
  155.     GoTo Again
  156.   Else
  157.     Do ShowSystemSummary
  158.   EndIf
  159. EndIf
  160.  
  161. If [Installed] = YesCharacter
  162. else
  163.   If [FixedDiskRequired] = YesCharacter
  164.     DetermineInstallationDrive QueSize RequireFixed
  165.   else
  166.     DetermineInstallationDrive QueSize
  167.   EndIf
  168.  
  169.   [InstallationDirectory] := InstallationDrive:\[DefaultInstallationDirectory]
  170.  
  171.   If [OfferInstallationDirectoryChoice] = YesCharacter
  172.     If [FixedDiskRequired] = YesCharacter
  173.       DetermineInstallationDirectory QueSize RequireFixed
  174.     else
  175.       DetermineInstallationDirectory QueSize
  176.     EndIf
  177.   else
  178.   EndIf
  179. EndIf
  180.  
  181.  
  182. GetQuedFiles [ExtractionOptions]
  183. [Installed] := YesCharacter
  184. If QueSize <> 0  ;; Some files were selected but not installed if <> 0
  185.   [Installed] := NoCharacter
  186.   UnqueAllFiles  ;; Remove uninstalled files from que
  187.   Dialog ;; Message when unable to get all necessary files
  188.     Unable to successfully complete this option.
  189.   EndDialog
  190. EndIf
  191.  
  192. ;;delete typestry (for reinstall) and rename the executable
  193. DeleteFiles
  194.   typestry.exe
  195. EndDeleteFiles
  196. If MathCoprocessorPresent
  197.   RenameFile [InstallationDirectory]\typefpu.exe to typestry.exe
  198. Else
  199.   RenameFile [InstallationDirectory]\typenofp.exe to typestry.exe
  200. EndIf
  201.  
  202. ;;if < Windows 3.1 then move commdlg.dll to windows system directory
  203. If WindowsVersion < 3.1
  204.   If FileExists [WindowsSystemDirectory]\commdlg.dll
  205.   Else
  206.     CopyFiles from [InstallationDirectory] to [WindowsSystemDirectory]
  207.       commdlg.dll
  208.     EndCopyFiles
  209.     DeleteFiles
  210.       commdlg.dll
  211.     EndDeleteFiles
  212.   EndIf
  213. EndIF
  214.  
  215. ;;write the rendermn.ini file
  216. AppendFile [InstallationDirectory]\rendermn.ini
  217.   #
  218.   # Pixar application configuration defaults.
  219.   #
  220.  
  221.   /errorpath                    [InstallationDirectory]\messages
  222.  
  223.   /displaytype/framebuffer      windows
  224.   /displaytype/file             tiff
  225.   /display/tiff                 internal
  226.   /display/tiff/progress                1
  227.  
  228.   /display/zfile                        internal
  229.   /display/zfile/progress               1
  230.   
  231.   /display/shadow                       internal
  232.   /display/shadow/progress      1
  233.  
  234.   /display/windows              internal
  235.   /display/windows/progress     1
  236.  
  237.   /display/bmp                  internal
  238.   /display/bmp/progress         1
  239.  
  240.   /display/fliraw                       internal
  241.   /display/fliraw/progress      1
  242.  
  243.   /display/tga                  internal
  244.   /display/tga/progress         1
  245.  
  246.   /display/postscript           internal
  247.   /display/postscript/progress  1
  248.  
  249.   /display/cpostscript          internal
  250.   /display/cpostscript/progress 1
  251.   
  252.   /standardshaderpath           .
  253.   /standardtexturepath          .
  254.   /shaderpath                   .:@:[InstallationDirectory]
  255.   /texturepath                  .:@:[InstallationDirectory]
  256.   /shaderlib/standard           standard.slb
  257.   /shaderlib/pixar              pixar.slb
  258.   /prman/shadingrate            1.0
  259.   /prman/gridsize                       256
  260.   /prman/texturememory          256
  261.   /prman/bucketsize             16 16
  262.   
  263.   /standardvfxmasterpath                [InstallationDirectory]\master
  264.   /vfxmasterpath                .:@
  265.  
  266.   /typestry/autosave            60
  267. EndAppendFile
  268.   
  269. ;;if there is no typbrwsr.ini  write the default browser ini file
  270. If FileExists [WindowsDirectory]\typbrwsr.ini
  271. Else
  272.   AppendFile [WindowsDirectory]\typbrwsr.ini
  273.     [Palette]
  274.     0=[InstallationDirectory]\STARTER\SHADOWMA.VIA
  275.     1=[InstallationDirectory]\STARTER\BACKGROU\SKY.VIA
  276.     2=[InstallationDirectory]\STARTER\BASIC\PLASTIC.VIA
  277.     3=[InstallationDirectory]\STARTER\BUILDING\CONCRETE.VIA
  278.     4=[InstallationDirectory]\STARTER\BUILDING\PLASTER.VIA
  279.     5=[InstallationDirectory]\STARTER\BUILDING\BRICK\RED.VIA
  280.     6=[InstallationDirectory]\STARTER\METAL\BRUSHED\COPPER.VIA
  281.     7=[InstallationDirectory]\STARTER\METAL\BRUSHED\GOLD.VIA
  282.     8=[InstallationDirectory]\STARTER\METAL\SMOOTH\CHROME.VIA
  283.     9=[InstallationDirectory]\STARTER\PATTERN\CHECKER.VIA
  284.     10=[InstallationDirectory]\STARTER\PATTERN\POLKADOT.VIA
  285.     11=[InstallationDirectory]\STARTER\PATTERN\RAMP\CYANMAGE.VIA
  286.     12=[InstallationDirectory]\STARTER\STONE\GRANITE\GREY.VIA
  287.     13=[InstallationDirectory]\STARTER\STONE\GRANITE\ROSE.VIA
  288.     14=[InstallationDirectory]\STARTER\STONE\MARBLE\BLACK.VIA
  289.     15=[InstallationDirectory]\STARTER\STONE\MARBLE\GREEN.VIA
  290.     16=[InstallationDirectory]\STARTER\STONE\MARBLE\RED.VIA
  291.     17=[InstallationDirectory]\STARTER\WOOD\MAPLE.VIA
  292.     18=[InstallationDirectory]\STARTER\WOOD\OAK.VIA
  293.     19=[InstallationDirectory]\VALIS\DEMO1\BLISTERP.VIA
  294.     20=[InstallationDirectory]\VALIS\DEMO1\CERAMICT.VIA
  295.     21=[InstallationDirectory]\VALIS\DEMO1\CRAYONIL.VIA
  296.     22=[InstallationDirectory]\VALIS\DEMO1\DRAGONHI.VIA
  297.     23=[InstallationDirectory]\VALIS\DEMO1\RIDGEDAL.VIA
  298.     24=[InstallationDirectory]\VALIS\DEMO1\TORTOISE.VIA
  299.   
  300.     [RadioButtons]
  301.     FileNames=2
  302.   EndAppendFile
  303. EndIf
  304.   
  305. ;;add or modify the extension list in win.ini for typestry
  306. ModifyTextFile [WindowsDirectory]\win.ini
  307.   InSection [Extensions]
  308.   AddOrChangeLineWith (typ,=,^.typ) as "typ=[InstallationDirectory]\typestry.exe ^.typ" At Beginning
  309. EndModifyTextFile
  310.  
  311. ;;make a pixar group and add typestry.exe to it
  312. BuildProgramGroup "Pixar" PIXAR.GRP
  313.   [InstallationDirectory]\typestry.exe "[ProductName] [ProductVersion]"
  314.   [InstallationDirectory]\aawin.exe "AAPlay 1.1" [InstallationDirectory]\aawin.exe 2
  315. EndBuildProgramGroup
  316.  
  317. Do ExitInstallation
  318.  
  319. :Continue
  320. GoTo Again
  321.  
  322.  
  323.  
  324. Procedure ShowHelpInfo
  325. Dialog PressAKey [SpecialPopupColors]  ;; How to reach technical support
  326. For assistance, dial (555)555-1212 and ask for
  327. Customer Service.  You are installing
  328. [ProductName].
  329.  
  330. You can get a summary of your computer system
  331. by pressing YesCharacter.  This information will be
  332. important should you call Customer Service.
  333. EndDialog
  334. If [YesOrNo1] = YesCharacter
  335.   Do ShowSystemSummary
  336. EndIf
  337. EndProcedure
  338.  
  339. Procedure ShowSystemSummary  ;; System summary - change with care.
  340.   Dialog PressAKey [SpecialPopupColors]
  341.     .cHERE IS A SUMMARY OF YOUR SYSTEM
  342.     .c[String8]  ;; notes whether any incompatibilities were found
  343.  
  344.     Operating System Version:  [OSVersionSummary]
  345.     CPU Type:  [CPUTypeSummary]
  346.     Display Adapter:  [DisplayAdapterSummary]
  347.     Math Coprocessor:  [MathCoprocessorStatus]
  348.     Main Memory Present:  [SystemMemorySummary]
  349.     Extended Memory Present:  ExtendedMemoryPresentK
  350.     Installation Drive:  [InstallationDriveSummary]
  351.     Network:  [NetworkActive]
  352.     [String9]  ;; information about network suitability
  353.   EndDialog
  354. EndProcedure
  355.  
  356. Procedure PrepareSystemReport
  357.   [InsufficientSystem] := NoCharacter
  358.   If OSVersion < [MinimumOSVersion]
  359.     [OSVersionSummary] := OSVersion (need at least [MinimumOSVersion])
  360.     [InsufficientSystem] := YesCharacter
  361.   else
  362.     [OSVersionSummary] := OSVersion
  363.   EndIf
  364.   If MainMemory < [MinimumSystemMemoryRequiredPresent]
  365.     [SystemMemorySummary] := MainMemoryK (need at least [MinimumSystemMemoryRequiredPresent]K)
  366.     [InsufficientSystem] := YesCharacter
  367.   else
  368.     [SystemMemorySummary] := MainMemoryK
  369.   EndIf
  370.   If 808X
  371.     If [Allow808X] = YesCharacter
  372.       [CPUTypeSummary] := 808x
  373.     else
  374.       [CPUTypeSummary] := 808x (not compatible with [ProductName])
  375.       [InsufficientSystem] := YesCharacter
  376.     EndIf
  377.   EndIf
  378.   If 80286
  379.     [CPUTypeSummary] := 80286
  380.   EndIf
  381.   If 80386
  382.     [CPUTypeSummary] := 80386
  383.   EndIf
  384.   If 80486
  385.     [CPUTypeSummary] := 80486
  386.   EndIf
  387.   If [CPUTypeSummary] = BlankString
  388.     [CPUTypeSummary] := 808x
  389.   EndIf
  390.   If MicroChannel
  391.     [CPUTypeSummary] := [CPUTypeSummary] (in MicroChannel Architecture)
  392.   else
  393.     [CPUTypeSummary] := [CPUTypeSummary] (ISA or EISA Architecture)
  394.   EndIf
  395.   If CGA
  396.     If [AllowCGA] = YesCharacter
  397.       [DisplayAdapterSummary] := CGA
  398.     else
  399.       [DisplayAdapterSummary] := CGA (not compatible with [ProductName])
  400.       [InsufficientSystem] := YesCharacter
  401.     EndIf
  402.   EndIf
  403.   If MDA
  404.     If [AllowMDA] = YesCharacter
  405.       [DisplayAdapterSummary] := MDA
  406.     else
  407.       [DisplayAdapterSummary] := MDA (not compatible with [ProductName])
  408.       [InsufficientSystem] := YesCharacter
  409.     EndIf
  410.   EndIf
  411.   If EGA
  412.     [DisplayAdapterSummary] := EGA
  413.   EndIf
  414.   If VGA
  415.     [DisplayAdapterSummary] := VGA
  416.   EndIf
  417.   If HGC
  418.     [DisplayAdapterSummary] := HGC
  419.   EndIf
  420.   If HGCPlus
  421.     [DisplayAdapterSummary] := HGC Plus
  422.   EndIf
  423.   If Network
  424.     [NetworkActive] := Network Active
  425.   else
  426.     [NetworkActive] := No Network Active
  427.   EndIf
  428.   If Novell
  429.     [NetworkActive] := Novell [NetworkActive]
  430.   EndIf
  431.   If [InstallationDirectory] <> BlankString
  432.     [InstallationDriveSummary] := InstallationDrive (FreeSpaceOnDrive InstallationDrive bytes free)
  433.   else
  434.     [InstallationDriveSummary] := (Not Selected)
  435.   EndIf
  436.   If MathCoprocessorPresent
  437.     [MathCoprocessorStatus] := Present
  438.   else
  439.     If [MathCoprocessorRecommended] = YesCharacter
  440.       [MathCoprocessorStatus] := Not Present But Recommended
  441.       If [CompatibilityNoticeGiven] = YesCharacter
  442.       else
  443.     Dialog  ;; Notice if math coprocessor recommended
  444.       [ProductName] needs a math coprocessor
  445.       for best performance.  Your system does not
  446.       contain one.
  447.     EndDialog
  448.       EndIf
  449.     else
  450.       [MathCoprocessorStatus] := Not Present
  451.     EndIf
  452.   EndIf
  453.  
  454.   If [InsufficientSystem] = YesCharacter
  455.     [String8] := (Please note the listed incompatibilities)
  456.   EndIf
  457.   If [NetworkInstallation] contains DisallowNetwork
  458.     [String9] := "   (You cannot install this version on a network drive)"
  459.   EndIf
  460.   [CompatibilityNoticeGiven] := YesCharacter
  461. EndProcedure
  462.  
  463.  
  464. Procedure GetNewCopyOfFile
  465. :StartOver
  466. Dialog [String1] 12 UseHeader "Getting a single file" UpperCase
  467.   Please enter the name of the file
  468.   you need a new copy of or leave
  469.   blank to exit.
  470. EndDialog
  471. If [String1] = BlankString
  472.   Exit
  473. EndIf
  474. If [String1] contains \
  475.   Popup Please enter just the file name with no path.
  476.   GoTo StartOver
  477. EndIf
  478. If FileIsInLibrary [String1]
  479. else
  480.   Popup Cannot find a file named [String1].
  481.   GoTo StartOver
  482. EndIf
  483. QueFiles
  484.   [String1]
  485. EndQueFiles
  486. GetQuedFiles [ExtractionOptions]
  487. EndProcedure
  488.  
  489.  
  490. Procedure ExitInstallation
  491. ClearScreen
  492. ;;If [Installed] = YesCharacter
  493. ;;  [Number1] := [MinimumBuffersSetting] + [MinimumFilesSetting]
  494. ;;  If [Number1] <> 0
  495. ;;    ModifyConfigSys
  496. ;;      SetBuffersToAtLeast [MinimumBuffersSetting]
  497. ;;      SetFilesToAtLeast [MinimumFilesSetting]
  498. ;;    EndModifyConfigSys
  499. ;;  EndIf
  500.  
  501. ;;  NoSysFileConfirmation  ;; since already inquired once
  502.  
  503. ;;  If [InstallationDirectory] <> BlankString
  504. ;;    If [AddInstallDirectoryToPath] = YesCharacter
  505. ;;      ModifyAutoexecBat
  506. ;;        AddPathComponent [InstallationDirectory] at End  ;; or "at Beginning"
  507. ;;      EndModifyAutoexecBat
  508. ;;    EndIf
  509. ;;  EndIf
  510.  
  511. ;;  If BootFilesModified
  512. ;;  else
  513. ;;    Dialog
  514. ;;      No changes were necessary to AUTOEXEC.BAT or CONFIG.SYS.
  515. ;;    EndDialog
  516. ;;  EndIf
  517.  
  518. ;;EndIf
  519. If [ProgramToRun] <> BlankString
  520.   Dialog [YesOrNo1]  ;; Explains purpose of program to be run, if any
  521.     [ProgramToRun] does <insert purpose here>.
  522.     Do you wish to run it now?
  523.   EndDialog
  524.   If [YesOrNo1] = YesCharacter
  525.     Run [ProgramToRun] SwapOut
  526.     If OSErrorCode <> 0
  527.       Dialog  ;; Message if OS unable to Run program
  528.     Unable to run [ProgramToRun].
  529.     Error code was OSErrorCode.
  530.       EndDialog
  531.     else
  532.       If OSExitCode <> 0
  533.     Dialog ;; Message if program ran but returned non-zero code
  534.       [ProgramToRun] executed but was not successful.
  535.       Return code OSExitCode.
  536.     EndDialog
  537.       EndIf
  538.     EndIf
  539.   EndIf
  540. EndIf
  541.  
  542. If [ReadmeFileName] <> BlankString
  543.   Dialog [YesOrNo1] ;; Ask whether to browse readme file, if any
  544.     [ReadmeFileName] contains important information.
  545.     Do you wish to read it now?
  546.   EndDialog
  547.   If [YesOrNo1] = YesCharacter
  548.     If FileExists [ReadmeFileName]
  549.       BrowseFile [ReadmeFileName]
  550.     else
  551.       Popup Sorry, readme file [ReadMeFileName] is missing.
  552.     EndIf
  553.   EndIf
  554. EndIf
  555.  
  556. Popup Typestry Installation Complete
  557. SoLong Quietly
  558. EndProcedure
  559.  
  560.  
  561.  
  562. Procedure SetupInstalit
  563.   SetCoordinatesTo 80x25
  564.   SetScreenAttrTo [ScreenColors]
  565.   SetBackgroundCharTo [BackgroundCharacter]
  566.   Do PrepareSystemReport
  567.   If [UseShadows] = YesCharacter
  568.     SetShadows On
  569.   else
  570.     SetShadows Off
  571.   EndIf
  572.   If [InquireAboutSystemFileLocation] = NoCharacter
  573.     NoSysFileConfirmation
  574.   EndIf
  575.   SetMainBorderTo     [MainBorder]
  576.   SetPopupBorderTo    [PopupBorder]
  577.   SetModifyModeTo     [ModifyMode]
  578.   SetShadowAttrTo     DarkGrayOnBlack
  579.   SetScreenAttrTo     [ScreenColors]
  580.   SetPopupAttrTo      [PopupColors]
  581.   SetAttentionAttrTo  [AttentionColors]
  582.   SetTopLineAttrTo    [TopLineColors]
  583.   SetBottomLineAttrTo [BottomLineColors]
  584.   SetTopLineTo        [TopLine]
  585.   SetExitMessageTo    [ExitMessage]
  586.   SetAllowExit        Off
  587. EndProcedure
  588.